package com.lwc.cfdns.service;

import com.lwc.cfdns.pojo.entity.SystemRoleMenu;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author spring
 * @description 针对表【cfdns_system_role_menu(角色和菜单关联表)】的数据库操作Service
 * @createDate 2023-05-24 09:51:48
 */
public interface SystemRoleMenuService extends IService<SystemRoleMenu> {

    /**
     * 权限处理
     *
     * @param role_id
     * @param menuList
     * @return boolean
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/24 10:18:54
     */
    boolean rules(Long role_id, List<Long> menuList);

    /**
     * 获取角色的已选中菜单
     *
     * @param id
     * @return List<Long>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/28 15:27
     */
    List<Long> roleMenuTreeselect(Long id);

    /**
     * 删除角色时删除对应菜单
     *
     * @param role_id
     * @return boolean
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/28 15:45
     */
    boolean deletes(Long role_id);
}
